//
//  MyCollectCell.m
//  UIA段项目 墨家天气
//
//  Created by dllo on 15/9/5.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "MyCollectCell.h"

@implementation MyCollectCell

- (void)awakeFromNib {
    // Initialization code
}
-(void)dealloc
{
    [_backView release];
    [_imamgeV release];
    [_titleStr release];
    [super dealloc];
    
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backView = [[UIView alloc]init];
        self.backView.backgroundColor = [[UIColor blackColor]colorWithAlphaComponent:0.3];
        [self.contentView addSubview:_backView];
        
        self.imamgeV = [[UIImageView alloc]init];
        [self.backView addSubview:_imamgeV];
        [_imamgeV release];
        
        self.titleStr = [[UILabel alloc]init];
        self.titleStr.textColor = [UIColor whiteColor];
        self.titleStr.numberOfLines = 0;
        self.titleStr.textAlignment = NSTextAlignmentCenter;
        self.titleStr.font = [UIFont boldSystemFontOfSize:15 * OffWidth];
        [self.backView addSubview:_titleStr];
        [_titleStr release];

        
        
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.backView.frame = CGRectMake(5 * OffWidth, 5 * OffHeight, self.contentView.frame.size.width - 10 * OffWidth, self.contentView.frame.size.height - 10 * OffHeight );
    self.imamgeV.frame = CGRectMake(0, 0,150 * OffWidth, self.backView.frame.size.height);
    self.titleStr.frame = CGRectMake(150 * OffWidth, 0 , self.backView.frame.size.width - 150 * OffWidth,self.backView.frame.size.height * OffHeight);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
